﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>ajax事件顺序Demo</title>
    <script src="jquery-1.8.0.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#std")
            .bind("click", function (event) {
                alert("This is the first event.");
            });
            $("#std").unbind("click");//取消事件绑定，若不加这句，两个alert就会先后弹出来，不是“点击一次，弹框一次”的效果
            $("#std").bind("click", function () {
                alert("This is the second event.");
            });
        })
    </script>
</head>
<body>
    <div>
        <input type="button" id="std" value="study" style="color: Blue; width: 8%; font-size: 20px;" />
    </div>
</body>
</html>
